import { createPinia } from 'pinia'
import { App} from "vue";

import { useDzvCache } from '@/services'
import { router, dynamicRouter } from '@/routers'

const pinia = createPinia()

export function setupPinia(app: App){
    pinia.use(({ store }) => {
        store.$router = router
        store.$cache = useDzvCache()
        store.$dynamicRouter = dynamicRouter 
      })
    app.use(pinia)
}

export * from './application'